Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not patch window resize fn if libX11.so not found #98

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

drojf
Copy link
Contributor

@drojf drojf commented Nov 17, 2022

A user on Steam Deck, Chapter 3, reported a black screen on startup. Their logs showed this error:

DllNotFoundException: libX11.so
  at (wrapper managed-to-native) MODUtility:XOpenDisplay (intptr)
  at MODUtility.X11ManualSetWindowSize (Int32 width, Int32 height) [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.SetResolution (Int32 width, Int32 height, Boolean fullscreen) [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.Initialize () [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.CheckInitialization () [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.Update () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

I don't really know what causes this, but I added some code to probe whether X11 functions are available. If they're not available, I assume windowing isn't broken and don't patch the window resize fn.

The user tested this fix and it worked for them. I also re-tested this on my Manjaro setup, and I can see in the logs that it still patches the window resize function on my own computer.

Related Issues:

@drojf drojf requested a review from TellowKrinkle November 17, 2022 23:24
Copy link
Member

@TellowKrinkle TellowKrinkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised these ancient versions of Unity have wayland support
(Or at least I assume that's what it's using if it isn't using X11)

@drojf drojf marked this pull request as ready for review November 18, 2022 01:05
@drojf drojf merged commit bdc49e5 into mod Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants